package com.cq.service.impl;

import com.cq.mapper.TbDistributorMapper;
import com.cq.pojo.TbDistributor;
import com.cq.pojo.TbDistributorExample;
import com.cq.service.DissService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DissServiceImpl implements DissService {

    @Autowired
    private TbDistributorMapper tbDistributorMapper;

    @Override
    public List<TbDistributor> findDissByUid(Integer uid) {
        TbDistributorExample example = new TbDistributorExample();
        TbDistributorExample.Criteria criteria = example.createCriteria();

        criteria.andUserIdEqualTo(uid);
        return tbDistributorMapper.selectByExample(example);
    }
}
